#ifndef __SCNS_QUATERNION_H__
#define __SCNS_QUATERNION_H__

#include "ScnsConfig.h"

#if defined(SCNS_QUATERNION_ENABLE)&&SCNS_QUATERNION_ENABLE==1

#include "ScnsYing.h"
#include "ScnsGyro.h"

typedef struct
{
    float q[4][1];
    float P[4][4];
}ScnsQuaternionRunData;

extern void scnsQuaternionEulerAngleToQuaternion(float pitch,float roll,float yaw,float q[4][1]);
extern void scnsQuaternionQuaternionToEulerAngle(const float q[4][1],float*pitch,float*roll,float*yaw);
extern void scnsQuaternion6Axes(const ScnsGyroSource*data,ScnsQuaternionRunData*rd,float dt);
extern uint8 scnsQuaternionTest(void);
#endif
#endif
